package BasicConcept


import rx.Observable
import rx.Subscriber

fun main(args: Array<String>) {

    rangeTest()
}

fun rangeTest() {
    Observable.create(object : Observable.OnSubscribe<String> {
        override fun call(t: Subscriber<in String>?) {

        }

    }).lift(object : Observable.Operator<Int, String> {

        override fun call(t: Subscriber<in Int>?): Subscriber<in String> {
            return object : Subscriber<String>() {
                override fun onNext(t: String?) {

                }

                override fun onCompleted() {

                }

                override fun onError(e: Throwable?) {

                }

            }
        }


    })

    //range producer
    Observable.range(0,5).subscribe({
        println(it)
    })
}